import request from '@/utils/request'

export function fetchList(data) {
  return request({
    url: '/invest/adviser/findAdviserByListsByPage',
    method: 'post',
    data
  })
}

// 新增
export function addAdviser(data) {
  return request({
    url: '/invest/adviser/addAdviser',
    method: 'post',
    data
  })
}

// 修改
export function update(data) {
  return request({
    url: '/invest/adviser/updateByInvestId',
    method: 'post',
    data
  })
}

// 删除
export function deleteAdviser(data) {
  return request({
    url: '/invest/adviser/deleteAdviser',
    method: 'post',
    data
  })
}

// 模板下载
export function download() {
  return request({
    url: '/invest/adviser/download',
    method: 'get',
    responseType: 'blob', // 下载格式
  })
}

// 上传
export function upload(data) {
  return request({
    url: '/invest/adviser/upload',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}


